export const local = {
    setItem(key,value){
        if(!key) return
        if(typeof key === 'string'){
            localStorage.setItem(key,value)
        }
    },
    getItem(key){
        if(!key) return
        if(typeof key === 'string'){
            return localStorage.getItem(key)
        }
    },
    remove(key){
        if(!key) return
        if(typeof key === 'string'){
            localStorage.removeItem(key)
        }
    },
    clear(){
        localStorage.clear()
    }
}
export const session = {
    setItem(key,value){
        if(!key) return
        if(typeof key === 'string'){
            sessionStorage.setItem(key,value)
        }
    },
    getItem(key){
        if(!key) return
        if(typeof key === 'string'){
            return sessionStorage.getItem(key)
        }
    },
    removeItem(key){
        if(!key) return
        if(typeof key === 'string'){
            sessionStorage.removeItem(key)
        }
    },
    clear(){
        sessionStorage.clear()
    }
}